IMotion.SetAxisSecondEncoderCountsPerUnit method

Sets the conversion ratio of the user-defined position unit to the count (pulse) unit used by an axis for the secondary encoder.

Namespace: IntervalZero.KINGSTAR.Base.Api

Assembly: IntervalZero.KINGSTAR.Base.Api (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0

Syntax

C#VB
KsError SetAxisSecondEncoderCountsPerUnit(
       int Index,
       double Numerator,
       double Denominator,
       bool Reverse
)
Function SetAxisSecondEncoderCountsPerUnit(
       Index As Integer,
       Numerator As Double,
       Denominator As Double,
       Reverse As Boolean
) As KsError

Parameters

Index

Type: int

The index of an axis. Indexes are zero based. Aliases affect this parameter.

 

Numerator

Type: double

Converts the drive unit to the user unit. For example, if the device is an encoder, typically the numerator is the resolution of the encoder.

 

Denominator

Type: double

Converts the drive unit to the user unit. For example, if you're using degree, the denominator will be 360 since there are 360 degrees in one revolution.

The following is an example of unit conversion:

angle: The angle you want.

resolution: The encoder resolution.

360: The degrees in a revolution.

position: The position.

 

Reverse

Type: bool

Reverses the direction of the axis.

Return value

Type: KsError

A return code of a method.

Remarks

Examples

C#
N/A

See also

IMotion Interface

IntervalZero.KINGSTAR.Base.Api Namespace